home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / rtextu10.zip / FMT.DOC < prev    next >
Text File  |  1993-05-06  |  10KB  |  278 lines

  1.  
  2.  
  3.                             #######                
  4.                             #        #    #   #####
  5.                             #        ##  ##     #  
  6.                             #####    # ## #     #  
  7.                             #        #    #     #  
  8.                             #        #    #     #  
  9.                             #        #    #     #  
  10.  
  11.  
  12.  
  13.  
  14. You can get part of the following documentation by invoking the program with
  15. the switches -v, -h, or -H . See README.TXT for more information.
  16.  
  17. -----------------------------------   -v   ------------------------------------
  18. FMT v1.0 -- ASCII text formatter
  19. Copr (c) 1992,1993 Richard Breuer. FMT is freeware. No warranties.
  20.  
  21. This is FMT/2 v1.0 - renamed to FMT (from RUTILS 4).
  22.  
  23. Author: Richard Breuer
  24.         Brunssumstrasse 6
  25.         5100 Aachen
  26.         (after Jul 1, 1993: 52074 Aachen)
  27.         Germany
  28.         Europe
  29.  
  30. Phone:  +49/241/85605
  31. Fax:    +49/241/8021329
  32.  
  33. Email:  ricki@pool.informatik.rwth-aachen.de (Preferred!)
  34.  
  35. -----------------------------------   -h   ------------------------------------
  36. FMT v1.0 -- ASCII text formatter
  37. Copr (c) 1992,1993 Richard Breuer. FMT is freeware. No warranties.
  38.  
  39. Usage:
  40.    FMT [-BcCfhHLnpRsv*] [-<n>] infile.. [{>|>>} outfile]
  41.  
  42. Options:
  43.    -<n>  Fill output lines to up to n columns, default is n=72
  44.    -B    Blockset mode. Fill lines up with spaces
  45.    -c    Crown margin mode. Preserve the indentation of the first two lines
  46.          within a paragraph, and align the left margin of each subsequent line
  47.          with that of the second line. Useful for tagged paragraphs
  48.    -C    Center lines
  49.    -f    Make text float around indentation changes within paragraphs
  50.    -h    Display this help screen
  51.    -H    Display another help screen with notes and examples
  52.    -L    Left align lines (default)
  53.    -n    Do not preserve indentation of follow-up lines
  54.    -p    Try to preserve the spacing within lines
  55.    -R    Right align lines
  56.    -s    Split lines only. Do not join short lines to form longer ones
  57.    -v    Display version info and information about the author
  58.    -*    Display internal information (for debugging purposes)
  59.  
  60. -----------------------------------   -H   ------------------------------------
  61. FMT v1.0 -- ASCII text formatter
  62. Copr (c) 1992,1993 Richard Breuer. FMT is freeware. No warranties.
  63.  
  64. Notes:
  65.    FMT reads from stdin if a filename is -. The output is always directed
  66.    to stdout. The line lengths are restricted to 255 characters. Longer lines
  67.    will be cut. The errorlevel is set to 1 if help has been displayed. It is
  68.    set to 255 in case of an error and 0 on normal completion. Output resulting
  69.    from multiple input files is appended to stdout. The processing order for
  70.    wildcards depends on the order of the directory entries. FMT returns
  71.    nonsense for binary files. Blank lines are preserved. FMT does not fill
  72.    lines beginning with ".", for compatibility with nroff. Note that TAB
  73.    characters may lead to unexpected results! A PARAGRAPH is defined as a
  74.    range of lines bounded by empty lines or file boundaries.
  75.  
  76. Examples:
  77.    FMT *.TXT
  78.       Formats all TXT files in the current directory to a width of 72 columns.
  79.    !}FMT -B
  80.       When invoked from VI (or a clone like ELVIS), '!}FMT -B' will work as
  81.       a filter and blockset the current paragraph.
  82.  
  83. -------------------------------------------------------------------------------
  84. Additional information:
  85.    FMT is an advanced re-implementation of the Unix FMT command. It offers
  86.    four substantially different modes of text formatting: Left aligned -L,
  87.    Right aligned -R, blockset (left and right aligned) -B, and centered -C
  88.    text.
  89.  
  90. How FMT works:
  91.    This section gives a detailed description of how FMTs options work. Each
  92.    switch is accompanied by an example text to illustrate the function.
  93.  
  94.    -B    Switches to blockset mode. In this mode the text is aligned to the
  95.        left AND the right margin. This is achieved by inserting spaces in
  96.     the text. These spaces are inserted at the positions where there
  97.        are already spaces in the line. The positions are chosen randomly.
  98.  
  99.         >   Let   this be an   example text which<
  100.         >   is      to be formatted.<
  101.         >      At this position the indentation changes!<
  102.  
  103.     FMT -B15 formats it as follows:
  104.  
  105.        >   Let  this be<
  106.        >   an   example<
  107.        >   text   which<
  108.        >   is    to  be<
  109.        >   formatted.<
  110.     >      At   this<
  111.     >      position<
  112.     >      the<
  113.     >      indentati<
  114.     >      on<
  115.     >      changes!<
  116.  
  117.         Let's take a close look at the result and mark some points:
  118.  
  119.         (1)     Some spaces have been removed, others have been inserted. This
  120.             has something to do with the so-called 'space simplification'
  121.         which first turns all double spaces into single ones before
  122.                 the new spaces are filled in.
  123.         (2)    The word indentati|on is truncated and wrapped into the next
  124.             line. The reason is, of course, that it does not fit in the
  125.                 first line.
  126.     (3)    The indentation change in the original text makes FMT open a
  127.         new paragraph. The old one is ended (you see, that the last
  128.         line is not left- and right-aligned), the new one started.
  129.                 Another way to end a paragraph are empty lines.
  130.  
  131.    -c    Crown margin mode. This option has the following effect:
  132.  
  133.         >   THIS IS AN EXAMPLE:<
  134.        >   Let   this be an   example text which<
  135.        >   is      to be formatted.<
  136.           >      At this position the indentation changes!<
  137.  
  138.         FMT -cB30 produces the following result:
  139.  
  140.     >   THIS IS AN EXAMPLE:<
  141.     >   Let this be an example text<
  142.     >   which is to be formatted.<
  143.     >      At    this position  the<
  144.     >      indentation changes!<
  145.  
  146.         You see that the header line makes kind a of an own paragraph.
  147.  
  148.    -C    Center lines. The effect of this option is as follows:
  149.  
  150.         >   Let   this be an   example text which<
  151.         >   is      to be formatted.<
  152.         >      At this position the indentation changes!<
  153.  
  154.     FMT -C15 formats it as follows:
  155.  
  156.     >   Let this be<
  157.     >    an example<
  158.     >    text which<
  159.     >     is to be<
  160.     >    formatted.<
  161.     >       At this<
  162.     >      position<
  163.     >         the<
  164.     >      indentati<
  165.     >         on<
  166.     >      changes!<
  167.  
  168.         The first paragraph (until "formatted.") is centered within the range
  169.         of columns 4 to 15 (15, because of the command argument -15; 4, because
  170.         the indentation is 3 spaces). The second is centered in 7..15.
  171.  
  172.    -f    Make text float around indentation changes within paragraphs. This
  173.        means that, if the indentation changes and a new paragraph is opened,
  174.         the old paragraph is filled up before the new one starts:
  175.  
  176.         >   Let   this be an   example text which<
  177.         >   is      to be formatted.<
  178.         >      At this position the indentation changes!<
  179.  
  180.     FMT -f20 formats it as follows:
  181.  
  182.     >   Let this be an<
  183.     >   example text<
  184.     >   which is to be<
  185.     >   formatted. At<
  186.     >      this position<
  187.     >      the<
  188.     >      indentation<
  189.     >      changes!<
  190.  
  191.      You see that the word "At" is put in the last line of the first
  192.         paragraph, before the second is started.
  193.  
  194.    -L    Left alignment. This is the default. See the example above (the only
  195.        difference is that the word "At" goes in paragraph #2.
  196.  
  197.    -n    Do not preserve indentation of follow-up lines. This options means that
  198.        only empty lines end paragraph, while indentation changes do not. For
  199.         our example this means:
  200.  
  201.         >   Let   this be an   example text which<
  202.         >   is      to be formatted.<
  203.         >      At this position the indentation changes!<
  204.  
  205.     FMT -f20 formats it as follows:
  206.  
  207.     >   Let this be an<
  208.     >   example text<
  209.     >   which is to be<
  210.     >   formatted. At<
  211.     >   this position the<
  212.     >   indentation<
  213.     >   changes!<
  214.  
  215.         The indentation change does not matter, all is formatted as if it were
  216.         one paragraph. This option will produce nice results, if you have a
  217.     text with a ragged left margin.
  218.  
  219.    -p    Try to preserve the spacing within lines. Our exa